package com.itheima.user.client;

import com.itheima.cloud.pojo.Order;
import com.itheima.user.client.fallback.OrderClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */
@FeignClient(value = "order-service", fallback = OrderClientFallback.class)
public interface OrderClient {

    @GetMapping("/order/findOrderByUserId/{id}")
    public List<Order> findOrderByUserId(@PathVariable("id") String username);
}
